package com.itedge.solutionmanager.taskdata.impl.solution;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Version;
import javax.validation.constraints.Size;

import com.itedge.solutionmanager.domain.impl.Document;
import com.itedge.infrastructure.taskdata.impl.AbstractTaskDataEntity;

@Entity
@Table(name="ADD_DOC_TASK_DATA")
public class AddDocumentationTaskData extends AbstractTaskDataEntity {
	
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;	

	@Version
    @Column(name = "version")
    private Integer version;
	
	@Column(name ="notes")
	@Size(max = 4000)
	private String notes;

    @OneToOne 
    @JoinColumn(name="DOCUMENT_ID") 
    private Document document;	
	
    @Override
	public Long getId() {
        return this.id;
    }

	public void setId(Long id) {
        this.id = id;
    }	

	@Override
	public Integer getVersion() {
        return this.version;
    }

	@Override
	public void setVersion(Integer version) {
        this.version = version;
    }
	
	public void setNotes(String notes) {
		this.notes = notes;
	}
	
	public String getNotes() {
		return this.notes;
	}

	public void setDocument(Document document) {
		this.document = document;
	}

	public Document getDocument() {
		return document;
	}
}